Add database persistence benchmarks#915
Conversation
|
🎉 This PR is now ready for review! |
5f75dd9 to
bc97c3a
Compare
|
Feel free to rebase on top of #919 and let me know if you see any differences in the benchmarks. |
|
codex summary: Benchmark ResultsPayment Benchmarks
Lower is better. Delta compares the async-branch rerun against the previous saved Criterion results.
Takeaways
|
|
It would have been nice if async persistence would show a clear performance win here. The store-level smoke tests are useful, but the closest thing to real node load seems to be the payment benchmark, and that does not show a meaningful improvement, putting aside that it is marked as not reliable yet. Does this tell us much about high-load node performance in practice? If not, what would be the next useful benchmark? |
Hmm, note that 'async persistence' means pre and post #919 AFAIU? I.e., it does not refer to LDK's async persistence itself, which we switched to pre-#919. |
Added a few more with start up time, forwarding payments, and channel opens. But working on making these more robust |
6bd3945 to
fedeaf4
Compare
AI-Assisted-By: OpenAI Codex
Benchmark realistic payment and pending-payment persistence workloads across filesystem, SQLite, and optional PostgreSQL stores. Use the async KV-store APIs so the measured paths match the database interfaces used by async persistence. AI-Assisted: Codex
Run the existing payments benchmark once per configured store backend so filesystem, SQLite, and optional PostgreSQL results are reported under the same payment flow. AI-assisted-by: OpenAI Codex
Wait for the cleanup payment to settle before starting the next payment benchmark sample. This keeps the measured forward-payment duration intact while avoiding HTLC state leaking into later samples. AI tools: Created with assistance from OpenAI Codex.
Add an operations bench target with a forwarding benchmark that compares sqlite, filesystem, and postgres stores over a settled multi-hop payment. AI-assisted-by: OpenAI Codex
Add a channel-open benchmark that measures the open_channel call while leaving chain confirmation cleanup outside the timed section. AI-assisted-by: OpenAI Codex
Add migratable key listing for SQLite and PostgreSQL stores so benchmark fixtures can copy persisted node state between database backends. AI-assisted-by: OpenAI Codex
Add a startup benchmark that restarts a node whose store already contains channel and payment data, so startup cost reflects persisted node state. AI-assisted-by: OpenAI Codex
|
Since #919 is merged marking this ready for review. Hopefully we get CI re-enabled because I am not sure how much these changes effect how long the bench CI job takes. The whole suite takes awhile so I tried trimming it down for CI. That subset takes a few minutes on my computer but unsure with the CI computers |
Closes #908
Benchmark realistic payment and pending-payment persistence workloads
across filesystem, SQLite, and optional PostgreSQL stores. Use the async
KV-store APIs so the measured paths match the database interfaces used by
async persistence.
Also adds support for different db backends to the current payment benchmark.
Benchmark Results
Results on my computer with a Ryzen 7 5800XT 8-Core, 16-Thread CPU
Operations
channel_openforwardingchannel_open_closepaymentsStartup
channels_1_payments_2channels_10_payments_2channels_100_payments_2channels_100_payments_1000Database Hot Path
channel_open_likeforwarding_25_like